package com.accenture.adf.newcodington.module12.sample;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

/**
 * 
 * Topic: Try-it using the Map data type from the Java collection framework
 * 
 * Instructions:
 * 1. Create a 'MapTryIt' class
 * 2. Create a main() method that will perform the following functions
 *    a. Create a Map object using the HashMap constructor
 *    b. Populate the map using the put() method
 *    c. Print all the map key value pairs using the for loop and Iterator
 *    
 */

public class MapTryIt {

	
	public static void main(String[] args) {
		
		// Code to create a HashMap of key value pair
		// where key is id of type String and value is a name
		Map<String, String> map=new HashMap<String, String>();
		map.put("1","Sasha");
		map.put("2","John");
		map.put("3","Stacie");
		map.put("4","Mike");
		map.put("5","Peter");
		
		// Code to print this map
		System.out.println("Map: " + map);
	}
}